<table class="table table-hover">
        <thead>
             <tr >
            <th>{{_("变量(key)")}}</th>
            <th>{{_("当前值")}}</th>
            <th>{{_("类型")}}</th>
            <th>{{_("作用&说明")}}</th>
            <th>{{_("更新时间")}}</th>
            <th></th>
            </tr>
        </thead>
        <tbody>
              <tr v-for="(conf, index) in confs">
                  <td width="150px">
                      <span class="osr-color-success" v-if="is_search_results || current_project=='all'">
                          {[conf.project]}<br>
                      </span>
                      {[conf.key]}
                  </td>

                  <!--编辑区域-->
                  <!--bool值-->
                  <td width="300px" v-if="conf.type=='bool'" class="form-group">
                    <select v-bind:id="conf._id" v-bind:name="conf._id"  class="input-sm form-control" >
                        <option v-if="conf.value" selected = "selected"  value="1">{{_("是")}}</option>
                        <option v-else  value="1">{{_("是")}}</option>

                        <option v-if="!conf.value" selected = "selected"  value="0">{{_("否")}}</option>
                        <option v-else   value="0">{{_("否")}}</option>
                    </select>
                  </td>
                  <!--密码-->
                  <td width="300px" v-if="conf.type=='password'" class="form-group" >
                        <input class="form-control osr-input" type="password"  v-model="conf.value">
                  </td>
                  <!--数组-->
                  <td width="300px" :id="'list_'+conf.key" width="300px" v-if="conf.type=='list'" class="form-group" >
                     <p>
                          <button v-on:click="add_input_tag(conf.key, index)" class="btn btn-sm osr-btn btn-success">
                             {{_("添加元素")}}
                         </button>
                     </p>
                      <span :id="'list_input'+index"></span>
                      <div :id="conf.key+'_input_'+index" v-for="v,index in conf.value"
                           class="form-group">
                          <input  class="form-control osr-input" type="text" :value="v" />
                          <i v-on:click="remove_tag(conf.key+'_input_'+index)" class="fa fa-sm osr-pointer pull-right osr-form-control-feedback osr-color-danger fa fa-close">
                            </i>
                      </div>

                  </td>
                    <!--dict-->
                  <td width="300px" :id="'dict_'+conf.key" width="300px" v-if="conf.type=='dict'" class="form-group" >
                     <p>
                        <button v-on:click="add_dict_tag(conf.key, index)" class="btn btn-sm osr-btn btn-success">
                         {{_("添加元素")}}
                        </button>
                     </p>
                      <data :id="conf.key+'_add'"></data>
                      <span :id="'dict_input'+index"></span>
                      <div :id="conf.key+'_input_'+k" v-for="v,k in conf.value"
                           class="form-group">
                           <input class="form-control osr-input" type="text" :value="k" />

                          <i v-on:click="remove_tag(conf.key+'_input_'+k)" class="fa fa-sm osr-pointer osr-color-danger fa fa-close pull-right osr-form-control-feedback">
                          </i>
                          <textarea class="form-control osr-input" style="height:80px;" :value="v" ></textarea>
                      </div>

                  </td>
                    <!--其他-->
                  <td width="300px" v-if="conf.type!='bool' && conf.type!='password' && conf.type!='list' && conf.type!='dict' " class="form-group" >
                      <textarea v-if="conf.value && conf.value.length>15" class="form-control osr-input" v-model="conf.value"></textarea>
                      <input v-else class="form-control osr-input" type="text" v-model="conf.value" >
                  </td>
                  <!--//编辑区域-->

                  <td width="50px">{[conf.type]}</td>
                  <td width="250px">
                      <span v-html="conf.info"></span>
                  </td>
                    <td width="150px">{[conf.update_time | formatDate]}</td>
                  <td width="100px" class="form-group">
                     <button v-on:click="warning_modal({msg:'{{_('确认配置无误?')}}'}, 'post_conf', conf.project, conf.key, index)"  class="btn osr-btn btn-info">
                         {{_("保存修改")}}
                     </button>
                  </td>
            </tr>
        </tbody>
    </table>
<script>
    function add_input_tag(conf_key, index){
        var id = osr_guid();
        html = '<div id="'+id+ '" class="list_dict form-group form-icon form-feedback">'
                +'<input class="form-control osr-input" type="text" placeholder="Value" /></div>';

        $("#list_input"+index).before(html);
    }

    function add_dict_tag(conf_key, index){
        var id = osr_guid();
        html = '<div id="'+id+ '" class="list_dict form-group form-icon form-feedback">'
                +'<input class="form-control osr-input" type="text" placeholder="Key:String" />'
                +'<textarea class="form-control osr-input" style="height:80px;" placeholder="Value:String or Json"  ></textarea></div>'
         $("#dict_input"+index).before(html);
    }

    function remove_tag(id){
         $("#"+id).remove();
    }

</script>